import com.google.appengine.api.datastore.*

log.info "Loading snippet: ${params.id}"
def key = KeyFactory.createKey("Snippet", params.id as long)

try {
	def snippet = datastore.get(key)
	request['snippet'] = snippet
	forward '/snippet.gtpl'
} catch (Throwable t) {
	log.error( "Erro", t)
	forward '/failure.gtpl'
}


